<template>
	<div>
		<h3>现在是数据是：{{ count }}</h3> 
		<el-button type="danger" @click='sub1'>-1</el-button>
		<el-button type="danger" @click='handle'>-3</el-button>
	</div>
</template>

<script>
import {mapState} from 'vuex'
import {mapMutations} from 'vuex'


	export default{
		data(){
			return{
				
			}
		},
		computed:{
			...mapState(['count'])
		},
		methods:{
			...mapMutations(['sub1','subN']),
			
			handle(){
				// this.$store.commit('subN',3)
				this.subN(3)
			},
			
			
			
		}
	}
</script>

<style>
</style>
